<?php
if(isset($pcat) && count($pcat))
    foreach ($pcat as $pc){
?>
<div class="list-content">
    <div class="title-content">
        <div class="title-name">
            <h2>
                <img src="<?php echo base_url("public/template/frontend/images") ?>/title-pro.png" alt="title">
                <?php echo $pc->name;?>
            </h2>
            <span>&nbsp;</span>
        </div>                        
    </div><!--title-content-->
    <div class="clear-both"></div>
    <div class="main-content">
        <?php
        $pro = $this->mproducts->getProByPid($pc->id,3);
        if(isset($pro) && count($pro))
            foreach ($pro as $p){
        ?>
        <div class="pro_item">
            <div class="item_img">
                <a href="<?php echo base_url("frontend/product/detail").'/'.$p->id;?>"><img src="<?php echo base_url($p->img); ?>" alt=""></a>
            </div>
            <div class="item_name">
                <a href="<?php echo base_url("frontend/product/detail").'/'.$p->id;?>" title="<?php echo $p->name;?>"><?php echo word_limiter(ucfirst($p->name), 6);?></a>
            </div>
            <div class="item_price">
                <span><?php echo number_format($p->price);?> đ</span>
            </div>
        </div>
        <?php        
            }
        ?>
    </div>
</div><!--list-content-->
<?php
    }
?>